package com.goldze.mvvmhabit.data.source;

import com.goldze.mvvmhabit.entity.DemoEntity;
import com.goldze.mvvmhabit.entity.response.CompanyResponseEntity;
import com.goldze.mvvmhabit.entity.response.GetBannerListResponseEntity;
import com.goldze.mvvmhabit.entity.response.GetChatUsersResponseEntity;
import com.goldze.mvvmhabit.entity.response.GetHistoryMsgResponseEntity;
import com.goldze.mvvmhabit.entity.response.GetLeaveListResponseEntity;
import com.goldze.mvvmhabit.entity.response.GetNewMsgResponseEntity;
import com.goldze.mvvmhabit.entity.response.GetTypeListResponseEntity;
import com.goldze.mvvmhabit.entity.response.LoginResponseEntity;
import com.goldze.mvvmhabit.entity.response.RegisterResponseEntity;
import com.goldze.mvvmhabit.entity.response.SelectDepartmentResponseEntity;
import com.goldze.mvvmhabit.entity.response.UserInfoResponseEntity;
import com.goldze.mvvmhabit.entity.response.VersionResponseEntity;

import java.util.ArrayList;
import java.util.List;

import io.reactivex.Observable;
import me.goldze.mvvmhabit.http.BaseResponse;

/**
 * Created by goldze on 2019/3/26.
 */
public interface HttpDataSource {
    //模拟登录
    Observable<Object> login();

    //模拟上拉加载
    Observable<DemoEntity> loadMore();

    Observable<BaseResponse<DemoEntity>> demoGet();

    Observable<BaseResponse<DemoEntity>> demoPost(String catalog);

    Observable<BaseResponse<LoginResponseEntity>> loginbypassword(String phone, String passWord);

    Observable<BaseResponse<UserInfoResponseEntity>> getUserInfo();

    Observable<BaseResponse<RegisterResponseEntity>> register(String phone, String password, String name,
                                                             String settingPassword);

    Observable<BaseResponse<String>> sendSmsCode(String phone);

    Observable<BaseResponse<GetLeaveListResponseEntity>> getLeaveList(int currentPage, int pageSize);

    Observable<BaseResponse<List<SelectDepartmentResponseEntity>>> getDepartList();

    Observable<BaseResponse<String>> getCompanyInfo();

    Observable<BaseResponse<CompanyResponseEntity>> getCompany();

    Observable<BaseResponse<VersionResponseEntity>> getCheckVersion();

    Observable<BaseResponse<Boolean>> requestChangePassword(String oldPassWord, String newPassWord);

    Observable<BaseResponse<Boolean>> getModifyDepart(String id);

    Observable<BaseResponse<ArrayList<GetBannerListResponseEntity>>> getGetBannerList();

    Observable<BaseResponse<String>> addLeaveForm(String starTime, String endTime, String reason,
                                                  String typeId, String image, String address);

    Observable<BaseResponse<List<GetChatUsersResponseEntity>>> getChatUsers();

    Observable<BaseResponse<String>> DelectUsers(String friendId);

    Observable<BaseResponse<ArrayList<GetTypeListResponseEntity>>> getTypeList();

    Observable<BaseResponse<List<GetHistoryMsgResponseEntity>>> getHistoryMsg(String receiverId, String endTime, String startTime);

    Observable<BaseResponse<String>> sendMsg(String receiverId,
                                             String content,
                                             String messageType);

    Observable<BaseResponse<String>> setHasRead(String senderId);

    Observable<BaseResponse<List<GetNewMsgResponseEntity>>> getNewMsg();

    Observable<BaseResponse<String>> uploadImg(String urlPath);

    Observable<BaseResponse<Boolean>> uploadHead(String urlPath);

    Observable<BaseResponse<String>> forgetPwd(String phone, String code, String passWord);

    Observable<BaseResponse<Boolean>> setUserSex(String sex);

}
